﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Game_MVC3.Models;

namespace Game_MVC3.Controllers
{
    public class NewsController : Controller
    {

        private GameDbContext db = new GameDbContext();

        //
        // GET: /News/
        public ActionResult Index()
        {
            return View(db.NewsList.ToList().OrderByDescending(d => d.Date));
        }

        protected override void Dispose(bool disposing)
        {
            db.Dispose();
            base.Dispose(disposing);
        }

    }
}
